
--################# HEADER #################

--################# Include
AddCSLuaFile("cl_init.lua");
AddCSLuaFile("shared.lua");
include("shared.lua");
ENT.Model = "models/dhd/dhd.mdl"
ENT.PlorkSound = "tcs_stargate/dhd_tc1.mp3"; -- The old sound
--ENT.PlorkSound = "stargate/chevron_incoming.mp3"; -- The test failed

--################# SENT CODE #################

--################# SpawnFunction
function ENT:SpawnFunction(p,tr)
	if (not tr.Hit) then return end;
	local pos = tr.HitPos - Vector(0,0,7.8 + 7);
	local e = ents.Create("dhd_tcs_1");
	e:SetPos(pos);
	e:Spawn();
	e:Activate();
	local ang = p:GetAimVector():Angle(); ang.p = 15; ang.r = 0; ang.y = (ang.y+180) % 360
	e:SetAngles(ang);
	return e;
end
